package com.month.order.feign;

import com.month.order.feign.fallback.ProductFeignClientFallback;
import com.month.product.bean.Product;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * 远程调用商品服务接口
 */
@FeignClient(value = "service-product",fallback = ProductFeignClientFallback.class)
public interface ProductFeignClient {


    @GetMapping("/getProduct/{id}")
    Product  getProductById(@PathVariable("id") Long id);
}
